<!DOCTYPE html>
<html lang="cn">

<head>
    <title>重置密码</title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="author" content="Phoenixcoded">

    <link rel="icon" href="assets/images/favicon.ico" type="image/x-icon">

    <style>
        body, html {
            height: 100%;
            margin: 0;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        }

        body::before {
            content: "";
            position: fixed;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
            background-image: url('bg.png');
            background-size: cover;
            background-position: center;
            filter: blur(4px);
            z-index: -1;
        }

        .auth-wrapper {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
        }

        .auth-content {
            background-color: rgba(255, 255, 255, 0.85);
            border-radius: 10px;
            padding: 30px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
            width: 300px;
            text-align: center;
        }

        .form-control {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }

        .btn {
            width: 100%;
            padding: 10px;
            background-color: #4099ff;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        .btn:hover {
            background-color: #357ae8;
        }

        a {
            color: #4099ff;
            text-decoration: none;
        }

        a:hover {
            text-decoration: underline;
        }

        .text-muted {
            color: #6c757d;
        }
    </style>
</head>

<body>

    <div class="auth-wrapper">
        <div class="auth-content">

            <a href="https://www.nuit.edu.cn">
                <img src="https://www.nuit.edu.cn/content/main/base/img/logo.png" alt="logo" style="width: 200px; margin-bottom: 40px;">
            </a>

            <h4 class="mb-3">重置密码</h4>
            <input type="text" class="form-control" id="Email" placeholder="注册邮箱">
            <input type="password" class="form-control" id="NewPassword" placeholder="新密码">
            <input type="password" class="form-control" id="ConfirmPassword" placeholder="确认新密码">
            <input type="text" class="form-control" id="VerificationCode" placeholder="验证码">
            
            <div style="display: flex; margin-bottom: 15px;">
                <button class="btn" style="width: 60%; margin-right: 10px;" onclick="sendCode()">获取验证码</button>
                <button class="btn" style="width: 40%;" onclick="resetPassword()">重置</button>
            </div>
            
            <p class="text-muted">想起密码了？<a href="login.html">返回登录</a></p>
        </div>
    </div>

    <script>
        function sendCode() {
            const email = document.getElementById("Email").value.trim();
            if (!email) {
                alert("请输入注册邮箱");
                return;
            }
            alert("验证码已发送至您的邮箱，请查收");
        }

        function resetPassword() {
            const email = document.getElementById("Email").value.trim();
            const newPass = document.getElementById("NewPassword").value.trim();
            const confirmPass = document.getElementById("ConfirmPassword").value.trim();
            const code = document.getElementById("VerificationCode").value.trim();

            if (!email || !newPass || !confirmPass || !code) {
                alert("请填写所有字段");
                return;
            }

            if (newPass !== confirmPass) {
                alert("两次输入的密码不一致");
                return;
            }

            alert("密码重置成功，请使用新密码登录");
            window.location.href = "index.html";
        }
    </script>
</body>

</html>